package com.rx.mgt.dao;

import com.rx.mgt.dao.base.ManagementHibernateDaoBase;
import com.rx.mgt.domain.DomainSign;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by zxj on 2017/5/31.
 */
@Repository
public class DomainSignDao extends ManagementHibernateDaoBase<DomainSign,Long> {
    public void deleteByDomain(String domain) {
        String  hql = " delete from DomainSign s where s.domain=:domain";
        Query query = template.getSessionFactory().getCurrentSession().createQuery(hql);
        query.setParameter("domain",domain);
        query.executeUpdate();
    }
}
